package com.zhangshujie.ShoppingSystem;

public abstract class User {
    protected String id;
    protected String username;
    protected String password;
    protected String phoneNumber;
    protected String email;

    public User(String id, String username, String password, String phoneNumber, String email) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.phoneNumber = phoneNumber;
        this.email = email;
    }

    public String getId() {
        return id;
    }

    public String getUsername() {
        return username;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public String getEmail() {
        return email;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public abstract void changePassword(String newPassword);

    @Override
    public String toString() {
        return STR."User{id='\{id}\{'\''}, username='\{username}\{'\''}, phoneNumber='\{phoneNumber}\{'\''}, email='\{email}\{'\''}\{'}'}";
    }
}
